# exercise1.erb
# mario hsieh

puts "hello there!"

first_name = "Bruce"

last_name = "Lee"

# using % notation
puts "First name is %s and last name is %s." % [first_name, last_name]

# using # notation
puts "First name is #{first_name} and last name is #{last_name}."


# practice with puts and print
print "This line will be printed on same as the next."
puts "The following line will be on a new line."
print "Hello."

# \ for double and single quotes
puts "Magic Johnson is 6'9\" tall"
puts 'Magic Johnson is 6\'9" tall'

# new line practice
puts "hello\nthere"

# tab practice
puts "\thello"

# class practice

class AddressBook
	@@number_of_contacts = 0

	def initialize(name, email, address)
		@name = name
		@email = email
		@addres = address
		@@number_of_contacts += 1

		puts "\nCreated contact #{@@number_of_contacts}"
	end
	
	def displayContact
		puts "Contact Name: %s" % @name
		puts "Contact Email: %s" % @email
		puts "Contact Address: %s" % @addres
	end
end

# creating instance of class

alfie= AddressBook.new("Alfie", "alfie@alfie.com", "New York")
alfie.displayContact

x = 1
y = 2

z = x + y

i = x*y

j = y-x

puts z, i, j

x += 1

y += 1

z *= 2


if z > 1
	puts "z"
end

if y == 2
	puts y
end

puts "this is a sentence" unless x > 3



$i = 0
begin
	puts "hi, how are you?"
	$i+=1
end while $i < 3



for i in 0..3
	puts "more loops practice"
end








